package com.gin.kotlin.no_gay_alliance.database.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.gin.kotlin.no_gay_alliance.database.entity.PostDraft

@Dao
interface PostDraftDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun add(postDraft: PostDraft)

    @Query("select * from PostDraft where uuid=:uuid")
    fun get(uuid: String): PostDraft?

    @Query("delete from PostDraft where uuid=:uuid")
    fun del(uuid:String)
}